<html>
    <head>
        <title>ajax test</title>
        <script src="https://cdn.staticfile.org/jquery/1.7.2/jquery.min.js"></script>
    </head>
    <body>
        ajax test.
    <script>
        $.ajax({
            url: "?ajax=1",
            statusCode: {
                // 422: function() {
                //     console.log("422 ...")
                // }
            }
        }).done(function(data) {
            console.log(data);
        }).error(function(data) {
            console.log($.parseJSON(data.responseText));
                // console.log(data);
        });
    </script>
    </body>
</html>
